﻿CREATE TABLE [audit].[Account] (
    [AccountId]         SMALLINT      NOT NULL,
    [AccountLegacyId]   INT           NULL,
    [AccountCode]       VARCHAR (8)   NOT NULL,
    [AccountType]       CHAR (1)      NOT NULL,
    [AccountName]       VARCHAR (100) NOT NULL,
    [AccountCateryId]   SMALLINT      NOT NULL,
    [AccountCateryCode] CHAR (3)      NOT NULL,
    [AccountOwnerId]    SMALLINT      NULL,
    [AccountOpenedDate] DATE          NULL,
    [AccountClosedDate] DATE          NULL,
    [AccountClosedBy]   NVARCHAR (20) NULL,
    [IsLatest]          BIT           NOT NULL,
    [IsActive]          BIT           NOT NULL,
    [IsInternal]        BIT           NOT NULL,
    [AuditId]           INT           NOT NULL,
    [AuditType]         CHAR (1)      NOT NULL,
    [IsAuditRowNew]     BIT           NOT NULL
);

